﻿using EPiServer.Shell.ViewComposition;

namespace OpenWaves.EPiServer.BrightcoveVideoCloudProperty
{
    [Component]
    public class BrowserWidget : ComponentDefinitionBase
    {
        public const string ClientClass = "ow-epi-videocloud.BrowserWidget";

        public BrowserWidget()
            : base(ClientClass)
        {
            Title = "Brightcove VideoCloud Browser";
            Categories = new string[1]
                {
                    "cms"
                };
        }

        public override bool SupportsAutomaticRegistration
        {
            get { return true; }
        }

        public override IComponent CreateComponent()
        {
            IComponent component = base.CreateComponent();

            component.Settings.Add(new Setting("FileControllerUrl", BrowserController.GetControllerPath(), false));

//            AssemblyResourceVirtualPathProvider.EnsureRegistered();

            return component;
        }
    }
}